import qs from 'qs'
// axios
import request from '@/utils/request'
import {APPID} from '@/utils/base.js'
//user api

// 用户名称 get 方法
export function getUserName(params) {
  return request({
    url: '/user/name?' + qs.stringify(params),
    method: 'get',
    hideloading: true
  })
}
export function home(params) {
  return request({
    url: '/sys/gas/findGasAll?' + qs.stringify(params),
    method: 'get'
  })
}
export function homeDetails(params) {
  return request({
    url: '/sys/gas/queryPriceByPhone?' + qs.stringify(params),
    method: 'get'
  })
}
export function login(params) {
  return request({
    url: '/wx/redirect/' + params.appid + '/greet?code=' + params.code,
    method: 'get'
  })
}
export function getUserInfo(params) {
  return request({
    url: '/sys/WxUser/byIdWxUser',
    method: 'get'
  })
}
export function orderInfo(params) {
  return request({
    url: '/sys/WxUser/orderInfo?telPhone=17788116569&orderStatusName=' + params,
    method: 'get'
  })
}
export function editPhone(params) {
  return request({
    url: '/sys/WxUser/editWxUser',
    method: 'post',
    data: params
  })
}
export function subOread(params) {
  //
  return request({
    url: '/sys/Pay/payment?' + qs.stringify(params),
    method: 'get'
  })
}
export function getSecretCode(params) {
  return request({
    url: '/services/v3/begin/getSecretCode',
    method: 'get',
    data: {
      platformId: '98643413',
      phone: '17788116569'
    }
  })
}
export function JsapiTicket(params) {
  return request({
    url: '/wx/redirect/' + APPID + '/JsapiTicket?url=' + params,
    method: 'get'
  })
}
